Optimal. Leaf size=72 \[ -\frac {\left (a^2-2 b^2\right ) \csc (x)}{b^3}+\frac {a \csc ^2(x)}{2 b^2}-\frac {\csc ^3(x)}{3 b}+\frac {\left (a^2-b^2\right )^2 \log (a+b \csc (x))}{a b^4}+\frac {\log (\sin (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3970, 908}
\begin {gather*} \frac {\left (a^2-b^2\right )^2 \log (a+b \csc (x))}{a b^4}-\frac {\left (a^2-2 b^2\right ) \csc (x)}{b^3}+\frac {a \csc ^2(x)}{2 b^2}+\frac {\log (\sin (x))}{a}-\frac {\csc ^3(x)}{3 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 908
Rule 3970
Rubi steps
\begin {align*} \int \frac {\cot ^5(x)}{a+b \csc (x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x (a+x)} \, dx,x,b \csc (x)\right )}{b^4}\\ &=-\frac {\text {Subst}\left (\int \left (a^2 \left (1-\frac {2 b^2}{a^2}\right )+\frac {b^4}{a x}-a x+x^2-\frac {\left (a^2-b^2\right )^2}{a (a+x)}\right ) \, dx,x,b \csc (x)\right )}{b^4}\\ &=-\frac {\left (a^2-2 b^2\right ) \csc (x)}{b^3}+\frac {a \csc ^2(x)}{2 b^2}-\frac {\csc ^3(x)}{3 b}+\frac {\left (a^2-b^2\right )^2 \log (a+b \csc (x))}{a b^4}+\frac {\log (\sin (x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 85, normalized size = 1.18 \begin {gather*} \frac {-6 a b \left (a^2-2 b^2\right ) \csc (x)+3 a^2 b^2 \csc ^2(x)-2 a b^3 \csc ^3(x)-6 a^2 \left (a^2-2 b^2\right ) \log (\sin (x))+6 \left (a^2-b^2\right )^2 \log (b+a \sin (x))}{6 a b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 86, normalized size = 1.19
method | result | size |
default | \(-\frac {1}{3 b \sin \left (x \right )^{3}}-\frac {a^{2}-2 b^{2}}{b^{3} \sin \left (x \right )}+\frac {a}{2 b^{2} \sin \left (x \right )^{2}}-\frac {\left (a^{2}-2 b^{2}\right ) a \ln \left (\sin \left (x \right )\right )}{b^{4}}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (b +a \sin \left (x \right )\right )}{b^{4} a}\) | \(86\) |
risch | \(-\frac {i x}{a}-\frac {2 i \left (-3 i a b \,{\mathrm e}^{4 i x}+3 a^{2} {\mathrm e}^{5 i x}-6 b^{2} {\mathrm e}^{5 i x}+3 i a b \,{\mathrm e}^{2 i x}-6 a^{2} {\mathrm e}^{3 i x}+8 b^{2} {\mathrm e}^{3 i x}+3 \,{\mathrm e}^{i x} a^{2}-6 \,{\mathrm e}^{i x} b^{2}\right )}{3 b^{3} \left ({\mathrm e}^{2 i x}-1\right )^{3}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i x}-1+\frac {2 i b \,{\mathrm e}^{i x}}{a}\right )}{b^{4}}-\frac {2 a \ln \left ({\mathrm e}^{2 i x}-1+\frac {2 i b \,{\mathrm e}^{i x}}{a}\right )}{b^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}-1+\frac {2 i b \,{\mathrm e}^{i x}}{a}\right )}{a}-\frac {a^{3} \ln \left ({\mathrm e}^{2 i x}-1\right )}{b^{4}}+\frac {2 a \ln \left ({\mathrm e}^{2 i x}-1\right )}{b^{2}}\) | \(212\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 84, normalized size = 1.17 \begin {gather*} -\frac {{\left (a^{3} - 2 \, a b^{2}\right )} \log \left (\sin \left (x\right )\right )}{b^{4}} + \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (a \sin \left (x\right ) + b\right )}{a b^{4}} + \frac {3 \, a b \sin \left (x\right ) - 6 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (x\right )^{2} - 2 \, b^{2}}{6 \, b^{3} \sin \left (x\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 151 vs.
\(2 (68) = 136\).
time = 2.50, size = 151, normalized size = 2.10 \begin {gather*} -\frac {3 \, a^{2} b^{2} \sin \left (x\right ) - 6 \, a^{3} b + 10 \, a b^{3} + 6 \, {\left (a^{3} b - 2 \, a b^{3}\right )} \cos \left (x\right )^{2} + 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{2}\right )} \log \left (a \sin \left (x\right ) + b\right ) \sin \left (x\right ) - 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} - {\left (a^{4} - 2 \, a^{2} b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right )}{6 \, {\left (a b^{4} \cos \left (x\right )^{2} - a b^{4}\right )} \sin \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{5}{\left (x \right )}}{a + b \csc {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 90, normalized size = 1.25 \begin {gather*} -\frac {{\left (a^{3} - 2 \, a b^{2}\right )} \log \left ({\left | \sin \left (x\right ) \right |}\right )}{b^{4}} + \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | a \sin \left (x\right ) + b \right |}\right )}{a b^{4}} + \frac {3 \, a b^{2} \sin \left (x\right ) - 2 \, b^{3} - 6 \, {\left (a^{2} b - 2 \, b^{3}\right )} \sin \left (x\right )^{2}}{6 \, b^{4} \sin \left (x\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.57, size = 157, normalized size = 2.18 \begin {gather*} \mathrm {tan}\left (\frac {x}{2}\right )\,\left (\frac {7}{8\,b}-\frac {a^2}{2\,b^3}\right )-\frac {\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}{a}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24\,b}+\frac {a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,b^2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (4\,a^2-7\,b^2\right )+\frac {b^2}{3}-a\,b\,\mathrm {tan}\left (\frac {x}{2}\right )}{8\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (2\,a\,b^2-a^3\right )}{b^4}+\frac {\ln \left (b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {x}{2}\right )+b\right )\,{\left (a^2-b^2\right )}^2}{a\,b^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________